import 'package:flutter_test/flutter_test.dart';
import 'package:pda_scan/pda_scan.dart';
import 'package:pda_scan/pda_scan_platform_interface.dart';
import 'package:pda_scan/pda_scan_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockPdaScanPlatform
    with MockPlatformInterfaceMixin
    implements PdaScanPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final PdaScanPlatform initialPlatform = PdaScanPlatform.instance;

  test('$MethodChannelPdaScan is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelPdaScan>());
  });

  test('getPlatformVersion', () async {
    PdaScan pdaScanPlugin = PdaScan();
    MockPdaScanPlatform fakePlatform = MockPdaScanPlatform();
    PdaScanPlatform.instance = fakePlatform;

    expect(await pdaScanPlugin.getPlatformVersion(), '42');
  });
}
